<?php
use \ea\library\Setting as SettingLib;
$reg_url = SettingLib::get('reg_url');
$cookie_domain = SettingLib::get('cookie_domain');
$login_url = SettingLib::get('login_url');
$oauth_url = SettingLib::get('oauth_url');
$oauth_secret = SettingLib::get('oauth_secret');
?>
<!DOCTYPE html>
<html>
<head>
	<title>基本设置 - EasyAccount</title>
	<?=$this->render('common/header')?>
</head>
<body class="fixed-nav bg-dark">
	<?=$this->render('common/navbar')?>
	<div class="content-wrapper">
		<div class="container-fluid">
			<div class="row">
				<div class="col-12">
					<h1>基本设置</h1>
					<div class="form-group row">
						<label class="col-sm-2 col-form-label" for="reg_url">注册链接</label>
						<div class="col-sm-10">
							<input type="text" class="form-control setting-item" id="reg_url" name="reg_url" value="<?=$reg_url?>" placeholder="http://example.com/register">
							<p><small>部分页面会显示此链接</small></p>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 col-form-label" for="login_url">默认登录跳转页</label>
						<div class="col-sm-10">
							<input type="text" class="form-control setting-item" id="login_url" name="oauth_url" value="<?=$login_url?>" placeholder="http://example.com/account/">
							<p><small>默认情况下，登录完成后跳转的页面</small></p>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 col-form-label" for="cookie_domain">自定义登录域名</label>
						<div class="col-sm-10">
							<input type="text" class="form-control setting-item" id="cookie_domain" name="cookie_domain" value="<?=$cookie_domain?>" placeholder=".example.com,.example.org">
							<p><small>以“,”分隔。如果设置了此选项，则EasyAccount不会再尝试自动推断域名，此处所填写的域名必须包括EasyAccount所在的域名</small></p>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script>window.ea.page="setting_basic";</script>
	<?=$this->render('common/footer')?>
</body>
</html>